<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul class="nav-links">
        <li><a href="#">Dashboard</a></li>
        <li class="center"> <a href="#">Portfolio</a></li>
        <li class="upward"><a href="#">Services</a></li>
        <li class="foward"><a href="#">Feedvak</a></li>
    </ul>
</body>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #c1f7f5;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        background-color: #fff;
        padding: 20px 15px;
        border-radius: 12px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links li {
        list-style: none;
        margin: 0 10px;
    }

    .nav-links li a {
        position: relative;
        color: #333;
        font-size: 20px;
        font-weight: 500;
        text-decoration: none;
    }

    .nav-links li a:before {
        content: '';
        position: absolute;
        left: 0;
        bottom: -5px;
        height: 3px;
        width: 0%;
        background: #34efdf;
        transition: all 0.4s ease;
    }

    .nav-links li a:hover:before {
        width: 100%;
    }

    .nav-links li.center a:before {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links li.upward a:before {
        width: 100%;
        bottom: -10px;
        opacity: 0;
    }

    .nav-links li.upward a:hover:before {
        bottom: -5px;
        opacity: 1;
    }

    .nav-links li.foward a:before {
        width: 100%;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.4s ease;
    }

    .nav-links li.foward a:hover:before {
        transform: scaleX(1);
        transform-origin: left;
    }
</style>

</html>